<!DOCTYPE html>
<html class="pixel-ratio-2 retina ios ios-9 ios-9-1 ios-gt-8 ios-gt-7 ios-gt-6"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>jQuery WeUI</title>
    
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">

<meta name="description" content="Write an awesome description for your new site here. You can edit this line in _config.yml. It will appear in your document head meta (for Google search results) and in your feed.xml site description.
">

<link rel="stylesheet" href="__PUBLIC__/weui2.0/css/weui.min.css">
<link rel="stylesheet" href="__PUBLIC__/weui2.0/css/jquery-weui.css">
<link rel="stylesheet" href="__PUBLIC__/weui2.0/css/demos.css">

    <style>
      .weui-label {
        width: 70px;
      }
    </style>
  </head>

  <body ontouchstart="">


    <header class="demos-header">
      <h1 class="demos-title">City Picker</h1>
    </header>

    
    <div class="weui-cells weui-cells_form">
      <div class="weui-cell">
        <div class="weui-cell__hd"><label for="name" class="weui-label">发出地</label></div>
        <div class="weui-cell__bd">
          <input class="weui-input" id="start" type="text" value="" readonly="" data-code="" data-codes="">
        </div>
      </div>
      <div class="weui-cell">
        <div class="weui-cell__hd"><label for="date" class="weui-label">目的地</label></div>
        <div class="weui-cell__bd">
          <input class="weui-input" id="end" type="text" value="" readonly="">
        </div>
      </div>
    </div>

    <h2 class="demos-second-title">只选择城市</h2>
    <div class="weui-cells weui-cells_form">
      <div class="weui-cell">
        <div class="weui-cell__hd"><label for="home-city" class="weui-label">城市</label></div>
        <div class="weui-cell__bd">
          <input class="weui-input" id="home-city" type="text" readonly="">
        </div>
      </div>
    </div>
<script src="__PUBLIC__/weui2.0/lib/jquery-2.1.4.js"></script>
<script src="__PUBLIC__/weui2.0/lib/fastclick.js"></script>
<script>
  $(function() {
    FastClick.attach(document.body);
  });
</script>
<script src="__PUBLIC__/weui2.0/lib/jquery-weui.js"></script>

<script src="__PUBLIC__/weui2.0/js/city-picker.js"></script>

    <script>
      $("#start").cityPicker({
        title: "选择出发地",
        onChange: function (picker, values, displayValues) {
          console.log(values, displayValues);
        }
      });
      $("#end").cityPicker({
        title: "选择目的地"
      });
      $("#home-city").cityPicker({
        title: "选择目的地",
        showDistrict: false,
        onChange: function (picker, values, displayValues) {
          console.log(values, displayValues);
        }
      });
    </script>
  
</body></html>